<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!-- 导入头部head，js内容 -->
<%--<jsp:include page="include_javascript_head.jsp"/>--%>
<!-- 导入头部标题栏内容 -->

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
    String basePath2 = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path ;
    request.setAttribute("basePath", basePath) ;
    request.setAttribute("basePath2", basePath2) ;


%>
<base href="<%=basePath%>">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>祥利百悦</title>
    <link rel="stylesheet" href="org/../css/bootstrap.min.css" />
    <link rel="stylesheet" href="org/../css/common.css" />
    <link rel="stylesheet" href="org/../css/welcome.css" />
    <link rel="stylesheet" href="org/../css/validationEngine.jquery.css" /><!--表单验证css-->
    <script type="text/javascript" src="org/../js/jquery-1.8.3.min.js"></script>
    <%--表单验证--%>
    <script type="text/javascript" src="org/../js/jquery.validationEngine-zh_CN.js" ></script>
    <script type="text/javascript" src="org/../js/jquery.validationEngine.js" ></script>
</head>
<body>
<div class="main_content create_site">
    <div class="col-xs-12 col-sm-12 div_bordered">
        <div class="panel panel-default choose_block">
            <div class="panel-heading color333">
                床位配置
                <a href="bed_config.html" class="btn_white2 pull-right" >&lt;快速生成</a>
            </div>
            <div class="divider"></div>
            <div class="site_block ">
                <ul class="bed_ul">
                    <li block-type='1'>
                        <div>
                            <div class="bed_li_title">楼栋(共<span class="mk_for_del">1</span>栋)</div>
                            <ul class="show_ul ul_for_building">
                                <c:forEach items="${allBuilding}" var="o"  varStatus="buildingStatus">
                                    <li class="show_lower_lever <c:if test='${o.id == currentBuilding.id}'>on</c:if>" id="building_${o.id}">
                                        <span>${o.name}</span>
                                        <span class="pull-right">
										<i class="icon_bed_edit"></i>
										<i class="icon_bed_delete"></i>
									</span>
                                    </li>
                                </c:forEach>
                            </ul>
                            <button type="button" class="btn_white2" onclick="showPopC('tankuang_for_building',this)">添加楼栋</button>
                        </div>
                    </li>
                    <li block-type='2' id="li_for_building" >
                            <div id="div_for_building_${currentBuilding.id}">
                                <div class="bed_li_title">
                                        <span>A栋</span>(共
                                        <span class="mk_for_del">1</span>层)
                                </div>
                                <ul class="show_ul ul_for_floor">
                                        <c:forEach items="${floors}" var="floor" varStatus="floorStatus">
                                            <li class="show_lower_lever <c:if test='${floorStatus.index==0}'>on</c:if>" id="floor_${floor.id}">
                                                <span>1层</span>
                                                <span class="pull-right">
											<i class="icon_bed_edit"></i>
											<i class="icon_bed_delete"></i>
										</span>
                                            </li>
                                        </c:forEach>

                                </ul>
                                <button type="button" class="btn_white2" onclick="showPopC('tankuang_for_floor',this)">添加楼层</button>
                            </div>

                    </li>
                    <li block-type='3' id="li_for_floor">
                            <div id="div_for_floor_${currentFloor.id}">
                                <div class="bed_li_title">
                                        <span>A栋-1层</span>(共
                                        <span class="mk_for_del">10</span>间)
                                </div>
                                <ul class="show_ul">
                                        <c:forEach items="${rooms}" var="room" varStatus="roomStatus">
                                                <li class="show_lower_lever on" id="room_${room.id}">
                                                    <span>A1-R1</span>
                                                    <span class="pull-right">
												<i class="icon_bed_edit"></i>
												<i class="icon_bed_delete"></i>
												<i class="icon_bed_info"></i>
											  </span>
                                                </li>
                                                <li class="show_lower_lever on" id="room_${room.id}">
                                                    <span>A1-R2</span>
                                                    <span class="pull-right">
												<i class="icon_bed_edit"></i>
												<i class="icon_bed_delete"></i>
												<i class="icon_bed_info"></i>
											  </span>
                                                </li>
                                        </c:forEach>
                                </ul>
                                <button type="button" class="btn_white2" onclick="showPopC('tankuang_for_room',this)">添加房间</button>
                            </div>
                    </li>
                    <li block-type='4' id="li_for_room">

                            <div id="div_for_room_${currentRoom.id}">
                                <div class="bed_li_title">
                                        <span>A栋-1层-R1</span>(共
                                        <span class="mk_for_del">1</span>张)
                                </div>
                                <ul class="show_ul ul_for_bed">
                                        <c:forEach items="${beds}" var="bed" varStatus="bedStatus">
                                            <li id="bed_${bed.id}">
                                                <span>B1</span>
                                                <font class="badge_f">￥
                                                    <em>1500</em>元/月</font>
                                                <input type="hidden" name="costItemId" value="${bed.costItemId}" />
                                                <span class="pull-right">
												<i class="icon_bed_edit"></i>
												<i class="icon_bed_delete"></i>
											  </span>
                                            </li>
                                        </c:forEach>
                                </ul>
                                <button type="button" class="btn_white2" onclick="showPopC('tankuang_for_bed',this)">添加床位</button>
                                <input type="hidden" value="${currentRoom.roomLevel}" class="roomLevel" />
                            </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
</body>
</html>
